// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import index from './router/index'
import VueRouter from 'vue-router'
import Vant from 'vant'
import 'vant/lib/index.css'
import Vuex from 'vuex'
import App from './App'
import store from '@/vuex/mutations'
Vue.config.productionTip = false
Vue.use(VueRouter)
Vue.use(Vant)
Vue.use(Vuex)
const routesPaths = [].concat(index)
const router = new VueRouter({
  mode: 'history',
  routes: routesPaths
})
router.afterEach((to, from, next) => {
  document.title = to.name
})
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
